import { COLUMNS_WIDTH } from '@/utils/common'
import { formatTime } from '@/utils/format'

export const COLUMNS = [
    {
        title: '#',
        dataIndex: 'id',
        key: 'id',
        fixed: 'left',
        width: COLUMNS_WIDTH.id
    },
    {
        title: '年份',
        fixed: 'left',
        dataIndex: 'year',
        width: COLUMNS_WIDTH.wd1,
        key: 'year'
    },
    {
        title: '脱贫人数(万)',
        dataIndex: 'newCount',
        width: COLUMNS_WIDTH.wd1,
        key: 'newCount'
    },
    {
        title: '贫困人数(万)',
        dataIndex: 'oldCount',
        width: COLUMNS_WIDTH.wd1,
        key: 'oldCount'
    },
    {
        title: '回访人数(万)',
        dataIndex: 'back',
        width: COLUMNS_WIDTH.wd1,
        key: 'back'
    },
    {
        title: '贫困发生率(%)',
        dataIndex: 'incidenceRate',
        width: COLUMNS_WIDTH.wd1,
        key: 'incidenceRate'
    },
    {
        title: '扶贫队伍人数(人)',
        dataIndex: 'team',
        width: COLUMNS_WIDTH.wd1,
        key: 'team'
    },
    {
        title: '贫困地区品平均收入(元)',
        dataIndex: 'povertyIncome',
        width: COLUMNS_WIDTH.wd1,
        key: 'povertyIncome'
    },
    {
        title: '全省农民平均收入(元)',
        dataIndex: 'provinceIncome',
        width: COLUMNS_WIDTH.wd1,
        key: 'provinceIncome'
    },
    {
        title: '中央拨款(万)',
        dataIndex: 'centre',
        width: COLUMNS_WIDTH.wd1,
        key: 'centre'
    },
    {
        title: '自治区拨款(万)',
        dataIndex: 'municipality',
        width: COLUMNS_WIDTH.wd1,
        key: 'municipality'
    },
    {
        title: '旗县区拨款(万)',
        dataIndex: 'bannerCounty',
        width: COLUMNS_WIDTH.wd1,
        key: 'bannerCounty'
    },
    {
        title: '整合资金(万)',
        dataIndex: 'mixMoney',
        width: COLUMNS_WIDTH.wd1,
        key: 'mixMoney'
    },
    {
        title: '其他资金(万)',
        dataIndex: 'otherMoney',
        width: COLUMNS_WIDTH.wd1,
        key: 'otherMoney'
    },
    {
        title: '创建时间',
        dataIndex: 'createdTime',
        key: 'createdTime',
        width: COLUMNS_WIDTH.wdDate,
        customRender: (value: any) => {
            return formatTime(value.text, 'YYYY-MM-DD HH:mm:ss')
        }
    },
    {
        title: '更新时间',
        dataIndex: 'updatedTime',
        key: 'updatedTime',
        width: COLUMNS_WIDTH.wdDate,
        customRender: (value: any) => {
            return formatTime(value.text, 'YYYY-MM-DD HH:mm:ss')
        }
    },
    {
        title: '操作',
        dataIndex: 'action',
        key: 'action',
        width: COLUMNS_WIDTH.wdBtn,
        fixed: 'right'
        // slots: { customRender: 'action' }
    }
]
